home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
source.exe
/
POSIX
/
SH
/
STD
/
STDC
/
MEMMOVE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-13
|
336b
|
26 lines
/* $Header$ */
#include <string.h>
Void *
memmove(dap, sap, n)
Void *dap;
Const Void *sap;
register size_t n;
{
register char *dp = dap, *sp = (Void*) sap;
if (n <= 0)
;
else if (dp < sp)
do *dp++ = *sp++; while (--n > 0);
else if (dp > sp) {
dp += n;
sp += n;
do *--dp = *--sp; while (--n > 0);
}
return dap;
}